import request from '@/libs/http/index'

// list
export function getAdventureApi(params) {
  return request({
    url: '/adventure',
    method: 'GET',
    params
  })
}

// create
export function addAdventureApi(data) {
  return request({
    url: '/adventure',
    method: 'POST',
    data
  })
}

export function updateAdventureApi(data) {
  return request({
    url: '/adventure',
    method: 'PATCH',
    data
  })
}

export function delAdventureApi(id) {
  return request({
    url: `/adventure/${id}`,
    method: 'DELETE'
  })
}

export function detailAdventureApi(id) {
  return request({
    url: `/adventure/${id}`,
    method: 'GET'
  })
}